﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Backend/Backend.Master" Inherits="System.Web.Mvc.ViewPage<IntroduceCompany.ArticleListView>" %>
<%@Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor"%>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ArticleCreate
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript" src="<%= Url.Content("../../../Content/Backend/js/ckeditor/ckeditor.js")%>"></script>
<!-- Begin one column tab content window -->
    <div class="onecolumn">
        <div class="header">
            <span>Thêm Bài Viết Mới</span>
            <div class="switchbutton">
                <a href="<%= Url.Action("ArticleList", "Article") %>" class="button">Danh sách</a>
            </div>
        </div>
        <br class="clear" />
        <div class="content">
        <% using (Html.BeginForm("ArticleCreate", "Article", FormMethod.Post, new { enctype = "multipart/form-data" })) {%>
        <%= Html.AntiForgeryToken(IntroduceCompany.Util.AntiKey.EditSalt)%>
            <div class="display-label error">
                <div class="errorcontent">
                   <%= Html.ValidationSummary(true) %>
                   <p><%= Html.ValidationMessageFor(model => model.Title) %></p>
                   <p><%= Html.ValidationMessageFor(model => model.Description) %></p>
                   <p><%= Html.ValidationMessageFor(model => model.Content) %></p>
                </div>
            </div>
            <div>
                <div class="editor_left">
                    <label>Ngôn Ngữ:</label><br /> 
                    <%= Html.DropDownListFor(model => model.LanguageID, (SelectList)ViewData["LaguageList"], new { @style="width:300px;"})%>
                </div>
            </div><br class="clear"/><br />
            <div>
                <div class="editor_left">
                    <label>Loại:</label><br />
                    <%= Html.DropDownListFor(model => model.ArticleTypeID, ViewData["ArticleTypeList"] as SelectList, new { @style="width:300px;"})%>
                </div>
                <div class="editor_middle">
                    <label>Đăng ảnh:</label><br />
                    <input name="uploadFile" id="File1" type="file" />
                </div>
            </div><br class="clear"/><br />
            <div>
                <label>Tiêu đề:</label><br />
                <%= Html.TextBoxFor(model => model.Title, new { @style = "width:620px;", maxlength = "500" })%>
            </div><br class="clear"/><br />
            <div>
                <label>Mô tả:</label><br />
                <%= Html.TextAreaFor(model => model.Description)%>
            </div><br class="clear"/><br />
            <div>
                <label>Nội dung:</label><br />
                <%= Html.TextAreaFor(model => model.Content, new { @class = "ckeditor" })%>
            </div><br class="clear"/>
            <p>
                <input type="submit" value="Tạo mới" />
            </p>
            <script type="text/javascript">
                CKEDITOR.replace('Content', {
                    BasePath: '../../../Content/Backend/js/ckeditor/',
                    customConfig: 'CustomAdmin.js'
                });
	        </script>
        <% } %>
        </div>
   </div>
<!-- End one column tab content window -->
</asp:Content>

